{% load i18n %}
{% if not condition.external_new_hire|length and not condition.preboarding.all|length and not condition.to_do.all|length and not condition.appointments.all|length and not condition.resources.all|length and not condition.introductions.all|length and not condition.external_admin|length and not condition.admin_tasks.all|length and not condition.preboarding.all|length and not condition.badges.all|length and not condition.integration_configs.all|length and not condition.hardware.all|length %}
  No items yet
{% endif %}

{# FOR NEW HIRES #}
{% if condition.external_new_hire|length or condition.to_do.all|length or condition.preboarding.all|length or condition.badges.all|length or condition.integration_configs.all|length or condition.resources.all|length or condition.introductions.all|length %}
<span class="badge bg-azure-lt text-azure-lt-fg mb-2">{% if is_new_hire %}{% translate "new hire" %}{% else %}{% translate "employee" %}{% endif %}</span>
{% endif %}
{% for item in condition.preboarding.all %}
  {% include '_condition_line_item.html' with type='preboarding' %}
{% endfor %}
{% for item in condition.appointments.all %}
  {% include '_condition_line_item.html' with type='appointment' %}
{% endfor %}
{% for item in condition.external_new_hire %}
  {% if item.send_via == ExternalMessageType.EMAIL %}
    {% include '_condition_line_item.html' with type='pendingemailmessage' %}
  {% elif item.send_via == ExternalMessageType.SLACK %}
    {% include '_condition_line_item.html' with type='pendingslackmessage' %}
  {% else %}
    {% include '_condition_line_item.html' with type='pendingtextmessage' %}
  {% endif %}
{% endfor %}
{% for item in condition.to_do.all %}
  {% include '_condition_line_item.html' with type='todo' %}
{% endfor %}
{% for item in condition.resources.all %}
  {% include '_condition_line_item.html' with type='resource' %}
{% endfor %}
{% for item in condition.introductions.all %}
  {% include '_condition_line_item.html' with type='introduction' %}
{% endfor %}
{% for item in condition.badges.all %}
  {% include '_condition_line_item.html' with type='badge' %}
{% endfor %}
{% for item in condition.integration_configs.all %}
  {% include '_condition_line_item.html' with type='integrationconfig' provision_created=1 %}
{% endfor %}

{# FOR ADMINS #}
{% if condition.external_admin|length or condition.admin_tasks.all|length or condition.hardware.all|length %}
<span class="badge bg-orange-lt text-orange-lt-fg mb-2">{% translate "admins" %}</span>
{% endif %}
{% for item in condition.admin_tasks.all %}
  {% include '_condition_line_item.html' with type='pendingadmintask' %}
{% endfor %}
{% for item in condition.external_admin %}
  {% if item.send_via == ExternalMessageType.EMAIL %}
    {% include '_condition_line_item.html' with type='pendingemailmessage' %}
  {% elif item.send_via == ExternalMessageType.SLACK %}
    {% include '_condition_line_item.html' with type='pendingslackmessage' %}
  {% else %}
    {% include '_condition_line_item.html' with type='pendingtextmessage' %}
  {% endif %}
{% endfor %}
{% for item in condition.hardware.all %}
  {% include '_condition_line_item.html' with type='hardware' %}
{% endfor %}
